package com.mmc.controller;


import com.mmc.dto.UserInfoDTO;
import com.mmc.result.R;
import com.mmc.service.IUserInfoService;
import com.mmc.service.impl.UserInfoServiceImpl;
import com.mmc.vo.UserLoginVO;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 用户基本信息 前端控制器
 * </p>
 *
 * @author author
 * @since 2024-09-20
 */
@RestController
@RequestMapping("/api/core/userInfo")
public class UserInfoController {

    @Autowired
    private IUserInfoService userInfoService;

    @PostMapping("/login")
    public R login(@RequestBody UserLoginVO loginVO){
        UserInfoDTO userInfoDTO=userInfoService.login(loginVO);
        return R.ok().data("userInfo",userInfoDTO);
    }
}
